from django.urls import path, re_path
from rest_framework import routers
from rest_framework_jwt.views import obtain_jwt_token
from .views import menu, user

urlpatterns = [
    re_path(r'^user/login/', obtain_jwt_token),  # JWT的签发和认证token的试图
    # re_path(r'^hello/', views.Hello.as_view()),
    re_path(r'^user/register/', user.RegisterView.as_view()),  # 用户注册
]
router = routers.DefaultRouter()
router.register(r'menus', menu.MenuView)
urlpatterns += router.urls
